#ifndef _STRAWGUI_CONTROLLER_KEYBOARD_EVENTS_H_
#define _STRAWGUI_CONTROLLER_KEYBOARD_EVENTS_H_

#include "sObserver.h"
#include "sEvents.h"
#include "sMath.h"

namespace sgui
{
namespace obs
{

	struct sKeyboardEvent : sEvent
	{
		typedef enum
		{
			KEY_SYSRQ = 0,
			KEY_PAUSE,
			KEY_ESCAPE,
			KEY_ENTER,
			KEY_KP_ENTER,
			KEY_UP,
			KEY_DOWN,
			KEY_LEFT,
			KEY_RIGHT,
			KEY_BACKSPACE,
			KEY_SPACE,
			KEY_TAB,
			KEY_TILDE,
			KEY_INSERT,
			KEY_DELETE,
			KEY_HOME,
			KEY_END,
			KEY_PAGEUP,
			KEY_PAGEDOWN,
			KEY_CTRL,
			KEY_CTRL_L,
			KEY_CTRL_R,
			KEY_ALT,
			KEY_ALT_L,
			KEY_ALT_R,
			KEY_SHIFT,
			KEY_SHIFT_L,
			KEY_SHIFT_R,
			KEY_SUPER,
			KEY_SUPER_L,
			KEY_SUPER_R,
			KEY_APP_MENU,
			KEY_CAPSLOCK,
			KEY_NUMLOCK,
			KEY_SCROLL,
			KEY_BRACKET_L,
			KEY_BRACKET_R,
			KEY_BACKSLASH,
			KEY_SLASH,
			KEY_COMMA,
			KEY_DECIMAL,
			KEY_SEMICOLON,
			KEY_APOSTROPHE,

			KEY_0,
			KEY_1,
			KEY_2,
			KEY_3,
			KEY_4,
			KEY_5,
			KEY_6,
			KEY_7,
			KEY_8,
			KEY_9,

			KEY_MINUS,
			KEY_EQUALS,

			KEY_A,
			KEY_B,
			KEY_C,
			KEY_D,
			KEY_E,
			KEY_F,
			KEY_G,
			KEY_H,
			KEY_I,
			KEY_J,
			KEY_K,
			KEY_L,
			KEY_M,
			KEY_N,
			KEY_O,
			KEY_P,
			KEY_Q,
			KEY_R,
			KEY_S,
			KEY_T,
			KEY_U,
			KEY_V,
			KEY_W,
			KEY_X,
			KEY_Y,
			KEY_Z,

			KEY_KP_0,
			KEY_KP_1,
			KEY_KP_2,
			KEY_KP_3,
			KEY_KP_4,
			KEY_KP_5,
			KEY_KP_6,
			KEY_KP_7,
			KEY_KP_8,
			KEY_KP_9,

			KEY_KP_SUB,
			KEY_KP_ADD,
			KEY_KP_MUL,
			KEY_KP_DIV,
			KEY_KP_DECIMAL,

			KEY_F1,
			KEY_F2,
			KEY_F3,
			KEY_F4,
			KEY_F5,
			KEY_F6,
			KEY_F7,
			KEY_F8,
			KEY_F9,
			KEY_F10,
			KEY_F11,
			KEY_F12,

			KEY_COUNT
		} EKeyButton;

		EKeyButton	m_button;
		
		const EEventType getType() const { return EVTYPE_KEYBOARD; }

		sKeyboardEvent(EKeyButton button) : m_button(button) {}
	};

	struct sKeyboardCharEvent : sEvent
	{
		wchar_t m_char;
		const EEventType getType() const { return EVTYPE_KEYBOARD; }
        const EEventId getID() const { return EVID_KEY_CHAR; }
		
		sKeyboardCharEvent(wchar_t char_) : m_char(char_) {}
	};

	struct sKeyboardPressEvent : sKeyboardEvent
	{
        const EEventId getID() const { return EVID_KEY_PRESS; }

		sKeyboardPressEvent(EKeyButton button) : sKeyboardEvent(button) {}
	};

	struct sKeyboardReleaseEvent : sKeyboardEvent
	{
        const EEventId getID() const { return EVID_KEY_RELEASE; }

		sKeyboardReleaseEvent(EKeyButton button) : sKeyboardEvent(button) {}
	};
};
};

#endif